import request from '@/utils/request'

/**
 * 获取违规定义
 *
 * @param {*} data (orgId)
 * @param {*} options {}
 * @returns
 */
export const fetchViolateDefineGet = (params, options) => {
  return request({
    url: '/violateRule/getOrgViolateRule',
    method: 'get',
    params,
    ...options
  })
}

/**
 * 设置违规定义
 *
 * @param {*} data { enabled, name, orgId, ruleId, value1, value2, value3}
 * @param {*} options {}
 * @returns
 */
export const fetchViolateDefineSet = (data, options) => {
  return request({
    url: '/violateRule/set',
    method: 'post',
    data,
    ...options
  })
}
